var addPage = avalon.define({
	$id: "addPage",
	uid: "",
	isSelected:function(lang){
		var classStr = '';
		if(lang===localStorage.getItem('lang')){
			classStr='mui-selected';
		}
		console.log(lang, localStorage.getItem('lang'));
		return classStr;
	}
});

mui.ready(function() {
	mui.nativeback();
	location.href = "dahua://langSwitching?lang=" + localStorage.getItem('lang');
	document.querySelector('.mui-table-view.mui-table-view-radio').addEventListener('selected', function(e){
		localStorage.setItem('lang',$(e.detail.el).attr('data-val'));
		console.log(localStorage.getItem('lang'));
        reload();
	});
});
